package io.mybatis.example.springboot.model;

import io.mybatis.provider.Entity;
import org.apache.ibatis.type.JdbcType;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * sys_menu - 菜单权限表
 *
 * @author mkj
 */
@Getter
@Setter
@Entity.Table("sys_menu" remark = "菜单权限表", autoResultMap = true)
public class SysMenuDO {
  @Entity.Column(value = "menu_id", id = true, remark = "菜单ID", updatable = false, insertable = false)
  private Long menuId;

  @Entity.Column(value = "menu_name", remark = "菜单名称")
  private String menuName;

  @Entity.Column(value = "parent_id", remark = "父菜单ID")
  private Long parentId;

  @Entity.Column(value = "order_num", remark = "显示顺序")
  private Integer orderNum;

  @Entity.Column(value = "path", remark = "路由地址")
  private String path;

  @Entity.Column(value = "component", remark = "组件路径")
  private String component;

  @Entity.Column(value = "query", remark = "路由参数")
  private String query;

  @Entity.Column(value = "is_frame", remark = "是否为外链（0是 1否）")
  private Integer isFrame;

  @Entity.Column(value = "is_cache", remark = "是否缓存（0缓存 1不缓存）")
  private Integer isCache;

  @Entity.Column(value = "menu_type", remark = "菜单类型（M目录 C菜单 F按钮）")
  private String menuType;

  @Entity.Column(value = "visible", remark = "菜单状态（0显示 1隐藏）")
  private String visible;

  @Entity.Column(value = "status", remark = "菜单状态（0正常 1停用）")
  private String status;

  @Entity.Column(value = "perms", remark = "权限标识")
  private String perms;

  @Entity.Column(value = "icon", remark = "菜单图标")
  private String icon;

  @Entity.Column(value = "create_by", remark = "创建者")
  private String createBy;

  @Entity.Column(value = "create_time", remark = "创建时间", jdbcType = JdbcType.TIMESTAMP)
  private Date createTime;

  @Entity.Column(value = "update_by", remark = "更新者")
  private String updateBy;

  @Entity.Column(value = "update_time", remark = "更新时间", jdbcType = JdbcType.TIMESTAMP)
  private Date updateTime;

  @Entity.Column(value = "remark", remark = "备注")
  private String remark;

}
